home *** CD-ROM | disk | FTP | other *** search
- Path: sdcc12.ucsd.edu!golgi!jstrout
- From: Joseph Strout <jstrout@ucsd.edu>
- Newsgroups: comp.lang.c++
- Subject: String Class in native Mac format (ANNOUNCEMENT)
- Date: Tue, 6 Feb 1996 08:01:51 -0800
- Organization: University of California, San Diego
- Message-ID: <Pine.SGI.3.91.960206075520.12266D-100000@golgi>
- NNTP-Posting-Host: golgi.ucsd.edu
- Mime-Version: 1.0
- Content-Type: TEXT/PLAIN; charset=US-ASCII
- X-Sender: jstrout@golgi
-
- I have a String class whose internal data format is a Str255
- (255-character Pascal string), the format used by the Macintosh Toolbox.
- This means that you can pass my String directly to any Toolbox routine
- which expects a string, either for reading OR writing.
-
- This solves what is generally a major headache when using the Toolbox
- from C/C++, i.e. conversion of various string formats.
-
- The class supports all the standard operators ( +, [], ==, etc.) plus a
- number of other handy operators and functions, such as * (repeat),
- Element (gets a specified element, separated by a delimiter), Uppercase
- (obvious), and Plural (pluralizes most English words correctly).
-
- Although the internal format is especially handy on the Mac, I use the
- same class (without modification) on other platforms (including Unix/g++
- and DOS/Borland C++). The Mac-specific code (mainly the conversion
- to/from Str255) is separated from the generic code in "#ifdef macintosh"
- blocks.
-
- The code and documentation are available via the WWW at:
- http://www-ncmir.ucsd.edu/~jstrout/classlib/
-
- The class may be used in any product, free of charge -- just slip my name
- into the credits somewhere, and kindly tell me about it.
-
- ,------------------------------------------------------------------.
- | Joseph J. Strout Department of Neuroscience, UCSD |
- | jstrout@ucsd.edu http://www-acs.ucsd.edu/~jstrout/ |
- `------------------------------------------------------------------'
-
-